import request from '@/utils/request'

/**
 * 查询权限列表
 */
export function getPermissionList() {
    return request({
       url:'/sys/permission',
    })
}

/**
 * 添加权限
 */
export function addPermission(data){
  return request({
      url:'/sys/permission',
      method:'post',
      data
  })
}

/**
 * 修改权限
 */
 export function updatePermission(data){
    return request({
        url:`/sys/permission/${data.id}`,
        method:'put',
        data
    })
  }

  /**
   * 查看详情
   */
  export function getPermissionDetail(id){
     return request({
         url:`/sys/permission/${data.id}`
     })
  }

  /**
   * 删除权限
   */
  export function delPermission(id){
        return request({
            url:`/sys/permission/${id}`,
            method:'delete'
        })
  }